package com.example.smartcity_ikun3.logic.network

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class RetrofitService{
    companion object{
        private const val BASE_URL = "http://124.93.196.45:10001/"

        private val retrofit: Retrofit = Retrofit.Builder()
            .baseUrl(BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build()

        fun <R> create(serviceClass: Class<R>) : R = retrofit.create(serviceClass)

        inline fun <reified T> create() : T = create(T::class.java)
    }
}